package com.neuedu.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.alibaba.fastjson.JSONObject;
import com.neuedu.model.Provider;
import com.neuedu.service.ProviderService;

@Controller
@RequestMapping("/provider")
public class ProviderAction {

	@Autowired
	private ProviderService providerService;

	@RequestMapping(value = "/findList")
	public void findAll(HttpServletRequest request, HttpServletResponse response) throws Exception {
		List<Provider> list = providerService.findList();

		String str = JSONObject.toJSONString(list);
		response.getWriter().write(str);
	}
}
